Skip to content

fix: make request URI building idempotent#798

Open
overcat wants to merge 1 commit into
masterfrom
fix/request-builder-build-uri-idempotent
Open

fix: make request URI building idempotent#798
overcat wants to merge 1 commit into
masterfrom
fix/request-builder-build-uri-idempotent

Conversation

@overcat
Copy link
Copy Markdown
Member

@overcat overcat commented Jun 4, 2026

No description provided.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates Horizon request builder URL construction to be idempotent, preventing path segments from being duplicated when buildUri() (and therefore execute()) is called multiple times on the same builder instance.

Changes:

  • Update RequestBuilder#buildUri() to avoid duplicating path segments across repeated invocations.
  • Add a regression test ensuring repeated buildUri() calls produce the same URI.
  • Document the fix in CHANGELOG.md.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
src/test/java/org/stellar/sdk/requests/AccountsRequestBuilderTest.java Adds a regression test asserting repeated buildUri() calls don’t change the generated URL.
src/main/java/org/stellar/sdk/requests/RequestBuilder.java Changes URI construction logic to rebuild from the server base each time, aiming for idempotency.
CHANGELOG.md Notes the idempotent URL generation fix under “Pending”.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/main/java/org/stellar/sdk/requests/RequestBuilder.java
@overcat overcat force-pushed the fix/request-builder-build-uri-idempotent branch 2 times, most recently from f80baf7 to 54446e2 Compare June 4, 2026 10:57
@overcat overcat requested a review from Copilot June 4, 2026 10:57
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 5 out of 5 changed files in this pull request and generated no new comments.

@codecov
Copy link
Copy Markdown

codecov Bot commented Jun 4, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 82.67%. Comparing base (0f97df3) to head (54446e2).

Additional details and impacted files
@@             Coverage Diff              @@
##             master     #798      +/-   ##
============================================
+ Coverage     82.63%   82.67%   +0.03%     
- Complexity     1615     1617       +2     
============================================
  Files           232      232              
  Lines          5938     5940       +2     
  Branches        657      658       +1     
============================================
+ Hits           4907     4911       +4     
+ Misses          659      657       -2     
  Partials        372      372              
Files with missing lines Coverage Δ
.../java/org/stellar/sdk/requests/RequestBuilder.java 79.10% <100.00%> (+0.97%) ⬆️
.../main/java/org/stellar/sdk/requests/SSEStream.java 83.33% <100.00%> (-0.17%) ⬇️

... and 1 file with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants